package com.itHuangTao.tank.components;

import com.almasb.fxgl.dsl.components.RechargeableIntComponent;
import com.itHuangTao.tank.Config;

public class TankLevelComponent extends RechargeableIntComponent {

    //坦克等级组件(0-2级)
    public TankLevelComponent() {
        super(Config.TANK_MAX_LEVEL);
        setValue(0);
    }

    //坦克升级
    public void upGrade() {
        restore(1);
    }

    //坦克降级
    public void downGrade() {
        damage(1);
    }

    //坦克直接满级
    public void gradeFull() {
        restoreFully();
    }
}
